xeenfandomcom-20200213-history
Talk:MAZExxxx.DAT File Format
Hi, Folks! I decompiled my MightAndMagic files and now I try to understand File Formats. there are Questions I have for MAP-Formats: You wrote that .CC-File includes MAZExxx.DAT and MAZE...MOB files. But in article about Filenames http://xeen.wikia.com/wiki/Filenames there are no such files. In filelist are Files AAZE....HED and AAZE....TXT. So I decompiled my file and took a look into them. The AAZE...TXT are clear: The store the specific messages to one sector. But where are the static sector message information like described in this article? I had the theory that .HED-Files contains MAP information. So I took a look to this files: 1) Each file has exactly 2048 bytes --> more than MAZExxx.DAT should have 2) There are no bytes with a byte value greater than 0x2 3) I compiled a little tool which shows this file as a char matrix. --> Result: It seems to include 16x16 arrays of bytes. with nearly same values: Below you can see first 256 bytes of File 0x96c1 in xeen.CC (Should be Vertigo Map upper left sector). How does this files match to MAZE...DAT described in this article? Remark: in this matrix all Values (2) are converted to ".". ...............0 ................ ................ ................ .......1.....1.. ................ ...1.....000.... .1..........1... ................ ............1... ...1.....000.... .1.............. .......1.....1.. ............1... ...1............ ............1... The MAZExxxx.DAT and .MOB files aren't in the CC file, they're stored in the save file. I don't see where it says they're in the CC file, but if you do, that should be corrected. The HED files are for the heads on the left and right side of the screen. If you have the clairvoyance spell active, the heads will nod or shake depending on if it's a good idea or not. 16x16x2 (two heads) = 512. I'm not sure why there are 4 too many, but it could be because there are four possible directions you can face per tile. Every event in the EVT file can specify not only the tile but also the direction it will trigger from. We're still investigating some things, but I think that's how it is. It could also be because an indoor map is actually 4 maps stitched together (2x2) and instead of loading four HED files, they just created one for the entire thing. That would also make sense. In any event, what happens is that, when you step on a tile and activate it's event, the HED file is checked to see whether this is a good event or a bad event. It does so simply by checking two bytes for the given tile: one for the left head, and one for the right head. If the byte is 0 it will shake no, if it is 1 it will nod yes, if 2 it will not move. Of course, this only applies if you have the clairvoyant spell active. It is possible for both heads to do something different: one can nod yes, the other shake no. For example, if a chest is trapped, one head will shake nod yes because it has treasure, the other will shake no because it will hurt you. If you want to try it, find a maze with a chest, cast the clairvoyant spell, and save. Then attempt to open the chest and see what the heads do. Then, with a hex editor, begin changing the bytes one at a time in the file, reload, and see if the head does something different, until you can figure out exactly how they are mapped. --WizardStan 00:38, March 1, 2010 (UTC) Hi, I am wondering what the deal is with the large negative x values in the outdoor/indoor draw struct ? eg: By my rekoning, that would be off the left side of the screen and not visable. Feel like I must have missed something. -dm Hi dm, it will indeed draw things off the left side of the screen, but the sprites are larger than the offset. By starting at -58, it means the leftmost 58 pixels (technically 64 pixels since 8 pixels are taken up by the border) will be drawn off-screen (or more accurately, not drawn at all) and the rest will drawn in screen. Similarly, some rather high Y values mean the opposite, that it will begin drawing and then stop at the edge of the screen. Hope this helps. WizardStan (talk) 10:09, July 24, 2016 (UTC)